package edu.scau.divineplace.entity.query.content;

import com.baomidou.mybatisplus.annotation.TableField;
import edu.scau.divineplace.entity.enums.ContentTypeEnum;
import edu.scau.divineplace.entity.validate.group.Update;
import edu.scau.divineplace.entity.validate.group.Upload;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @Author: x1aolone
 * @Date: 2021/1/3 15:16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("ContentBasicInfoQuery")
public class ContentBasicInfoQuery {

    @ApiModelProperty(value = "内容id")
    @NotNull(groups = Update.class)
    private Long id;

    @ApiModelProperty(value = "内容类型")
    @NotNull(groups = {Update.class, Upload.class})
    private ContentTypeEnum type;

    @ApiModelProperty(value = "内容原名")
    @NotBlank(groups = {Update.class, Upload.class})
    private String originalName;

    @ApiModelProperty(value = "内容中文名")
    @NotBlank(groups = {Update.class, Upload.class})
    private String chineseName;

    @ApiModelProperty(value = "开始/出生时间")
    private LocalDateTime beginTime;

    @ApiModelProperty(value = "结束/死亡时间")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "内容简介文字")
    @NotBlank(groups = {Update.class, Upload.class})
    private String introductionText;

    @ApiModelProperty(value = "内容简介图片")
    @NotBlank(groups = {Update.class, Upload.class})
    private String introductionImg;

}
